<!--
 * @Description  : 
 * @Autor        : guoxi
 * @Date         : 2022-08-17 21:03:39
 * @LastEditors  : 
 * @LastEditTime : 2022-08-17 21:03:39
 * @FilePath     : \rpms\src\App.vue
-->
<template>
  <el-config-provider :locale="currentLocale">
    <router-view />
  </el-config-provider>
</template>

<script>
import { ElConfigProvider } from "element-plus";
import zhCn from "element-plus/lib/locale/lang/zh-cn";
import en from "element-plus/lib/locale/lang/en";
import { initHowxm } from "howxm-js";
export default {
  components: {
    [ElConfigProvider.name]: ElConfigProvider
  },
  computed: {
    // eslint-disable-next-line vue/return-in-computed-property
    currentLocale() {
      switch (this.$storage.locale?.locale) {
        case "zh":
          return zhCn;
        case "en":
          return en;
      }
    }
  },
  created() {
    const { VITE_HOWXM_APPID, VITE_PROJECT_ENV } = import.meta.env;
    console.log("当前系统环境==>>", VITE_PROJECT_ENV);
    // 生产环境和测试环境才初始化浩客
    if (VITE_PROJECT_ENV === "pre" || VITE_PROJECT_ENV === "uat") {
      initHowxm(VITE_HOWXM_APPID);
    }
  }
};
</script>
<style lang="scss">
// @import "/@/style/index.scss";
// 修改进度条颜色
#nprogress .bar {
  background: #f89c34 !important;
}

// .editor-content-view {
//   border: 3px solid #ccc;
//   border-radius: 5px;
//   padding: 0 10px;
//   margin-top: 20px;
//   overflow-x: auto;
// }

.editor-content-view p,
.editor-content-view li {
  white-space: pre-wrap; /* 保留空格 */
}

.editor-content-view blockquote {
  border-left: 8px solid #d0e5f2;
  padding: 10px 10px;
  margin: 10px 0;
  background-color: #f1f1f1;
}

.editor-content-view code {
  font-family: monospace;
  background-color: #eee;
  padding: 3px;
  border-radius: 3px;
}
.editor-content-view pre > code {
  display: block;
  padding: 10px;
}

.editor-content-view table {
  border-collapse: collapse;
  background-color: #fff;
}
.editor-content-view th {
  background-color: #f5f2f0;
  padding: 3px 5px;
}

.editor-content-view td,
.editor-content-view th {
  border: 1px solid #ccc;
  min-width: 50px;
  // height: 20px;
  line-height: 1.5;
  padding: 3px 5px;
}
// .editor-content-view th {
//   background-color: #f1f1f1;
// }

.editor-content-view ul,
.editor-content-view ol {
  padding-left: 20px;
}

.editor-content-view input[type="checkbox"] {
  margin-right: 5px;
}
</style>
